# -*- coding: utf-8 -*-
# @Author : cm_Simple
# @Time : 2022/1/5
# @Remark: 温湿度 Server 层
from mxsoftpy import Server
from db.common.IOTManager.TemHumidity.humidity import (TemHumidityCheckDB,
                                                       TemHumidityDevicesDB)
from server.common.IOTManager.Water.water import WaterCheckServer


class TemHumidityCheckServer(WaterCheckServer):
    """
    温湿度监测实体 Server
    """
    __db__ = TemHumidityCheckDB

    def __init__(self):
        super().__init__()
        self.like_name = 'TemperatureHumidity'


class TemHumidityDevicesServer(Server):
    """
    温湿度设备实体 Server
    """
    __db__ = TemHumidityDevicesDB

    def read(self) -> dict:
        """
        查看水浸设备
        :return: 水浸设备
        """
        return self.db.read()
